<%#
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

	http://www.apache.org/licenses/LICENSE-2.0

$Id: syslog.htm 5448 2009-10-31 15:54:11Z jow $

-%>
<%+header%>
<%
local fdisklist = luci.util.exec("fdisk -l")
local blkidlist = luci.util.exec("blkid")
local smartctllist = luci.util.exec("/usr/bin/disk_info")
local isddnas = luci.util.exec("cat /proc/cpuinfo|grep -c DDNAS") or 0 
local isddnas = tonumber(isddnas) 
%>

<h2><a id="content" name="content"><%:Disk Information%></a></h2>
<h3><%:Disk Information Desc%></h3>
<div id="diskinfo">
<%:fdisk Information %><br></br>
<textarea readonly="readonly" wrap="off" rows="<%=fdisklist:cmatch("\n")%>" id="diskinfo"><%=fdisklist:pcdata()%></textarea><br></br>
<%:blkid uuid infomation%><br></br>
<textarea readonly="readonly" wrap="off" rows="<%=blkidlist:cmatch("\n")%>" id="diskinfo"><%=blkidlist:pcdata()%></textarea><br></br>
<% if  isddnas >= 1 then %>
<%:smartctl infomation%><br></br>
<textarea readonly="readonly" wrap="off" rows="<%=smartctllist:cmatch("\n")%>" id="diskinfo"><%=smartctllist:pcdata()%></textarea><br></br>
<% end -%>
</div>
<%+footer%>



